package com.walle.concurrenttest.waitnotify;

/**
 * @author zhangjiapeng
 * @Package com.walle.concurrenttest.waitnotify
 * @Description: ${todo}
 * @date 2019/2/18 10:17
 */
public class OddEvenPrintTest {

    public static void main(String[] args) throws InterruptedException {
        OddEvenPrint oddEvenPrint = new OddEvenPrint(0);
        Thread oddThread = new Thread(new OddPrint(oddEvenPrint));
        Thread evenThread = new Thread(new EvenPrint(oddEvenPrint));

        oddThread.setName("奇数线程");
        evenThread.setName("偶数线程");

        oddThread.start();
        evenThread.start();
    }
}
